/*************************************************************************
 * File Name   : wiznet_port.c
 * Brief       :
 * Change Logs :
 * Date           Author       Notes
 * 2022\03\02     liqi         The first version.
*************************************************************************/

#include <board.h>
#include <rtdevice.h>
#include <rthw.h>
#include <finsh.h>
#include <drv_spi.h>

static int rt_hw_spi_w5500_init(void)
{
    RCC_EnableAPB2PeriphClk(RCC_APB2_PERIPH_GPIOA, ENABLE);
    RCC_EnableAPB2PeriphClk(RCC_APB2_PERIPH_GPIOC, ENABLE);

    rt_hw_spi_device_attach("spi1", "spi10", GPIOA, GPIO_PIN_3);

    return RT_EOK;
}
INIT_DEVICE_EXPORT(rt_hw_spi_w5500_init);
